const BAST_URL = import.meta.env.APP_BAST_URL;
import axios from 'axios';
const service = axios.create({
  baseURL: BAST_URL,
  timeout: 5000, // 设置超时时间
});

function XhrPOST(url: string, data?: any, options?: any) {
  return service({
    method: 'POST',
    // headers:{},
    url,
    data,
    ...options,
  });
}
function XhrGET(url: string, params?: any, options?: any) {
  return service({
    method: 'POST',
    // headers:{},
    url,
    params,
    ...options,
  });
}

export { XhrPOST, XhrGET };
